package main

import (
	"fmt"
	"net/rpc"
)

func main() {
	// 1.建立链接
	client, err := rpc.Dial("tcp", ":8080")
	if err != nil {
		panic("连接失败")
	}
	//var reply *string = new(string)		// 分配地址，不然报错
	var reply string
	err = client.Call("HelloServiceName.Hello", "Tom", &reply)
	if err != nil {
		panic(err)
	}
	fmt.Println(reply)
}
